﻿using System;
using System.Web;
using System.Web.Mvc;
using FlickrXplorer.Web.ViewData;
using Linq.Flickr;

namespace FlickrXplorer.Web.Views.Photo
{
  public partial class DetailPage : ViewPage<PhotoDetail>
  {
      // Does not works for cached page.
      //protected void AppendPhotoId(string photoId)
      //{
      //    if (Request.Cookies["url"] != null)
      //    {
      //        string url = Request.Cookies["url"].Value;

      //        if (url.IndexOf("#") > 0)
      //        {
      //            //skip.
      //            url = url.Split(new char[] {'#'}, StringSplitOptions.RemoveEmptyEntries)[0];
      //        }
              
      //        url += "#" + photoId;    

      //        HttpCookie cookie = new HttpCookie("url");
      //        cookie.Value = url;
      //        Context.Response.Cookies.Add(cookie);
      //    }
      //}
  }
}
